<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="zh-cn" class="no-js">
<head>
    <meta http-equiv="Content-Type">
    <meta content="text/html; charset=utf-8">
    <meta charset="utf-8">
    <title>session共享测试</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="email=no">
    <script src="${ctx}/static/jquery2.min.js"></script>
    <script type="text/javascript">


        function getDataJson(){
            alert(22);
            /*$.getJSON("http://auth.fangbaba.com/nstatus?format=json", function(data){
                    $.each(data.servers.server, function(i,item){
                        alert(item.index);
                    });
            })*/
            var url = 'http://auth.fangbaba.com/nstatus?format=json';
            /*$.ajax(url, {
                dataType: 'jsonp',
                crossDomain: true,
                success: function(data) {
                    alert(data);
                }
            });*/

            $.ajax({
                type: "POST",
                url: url,
                dataType: "jsonp",
                crossDomain: true,
                success: function(msg){
                    alert( "Data Saved: " + msg );
                }
            });
        }

    </script>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
    <form action="${ctx}/session/setSessoin.html" method="post">
        <tr>
            <td>测试数据1</td>
            <td><input type="text" name="userName"/></td>
        </tr>
        <tr>
            <td>测试数据2</td>
            <td><input type="text" name="email"/></td>
        </tr>
        <tr>
            <td>查看数据</td>
            <td><a href="${ctx}/session/getSession.html">查看</a></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="submit"/>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" onclick="getDataJson();" value="测试1"/>
            </td>
        </tr>
    </form>
</table>
</body>
</html>